Many of the computations performed by processors consist of a large number of simple operations. As a result, a multiplication operation may take a significant number of clock cycles to complete.
Whilst this operation is justified for complex calculations, the same cannot be said of trivial operations, for example multiplication of one number by 0, +1, or −1, where the answer may be obtained in a much simpler fashion.
In certain applications, involving sparse matrices, the number of trivial operations carried out can be very significant owing to the presence of a significant number of zeros. The number of zeroes in a sparse matrix can be reduced or eliminated by storing the matrix in a sparse format such as compressed Row Storage (CRS) format, however due to the overheads in terms of address-generation such storage formats often result in very poor performance on commercial computer systems.
U.S. Pat. No. 5,262,973 (Richardson et al) discloses a method for reducing the computation time where the operation is a trivial one. In particular, the method performs at least two operations concurrently. The first operation is a conventional complex arithmetic operation. The second and further operations are performed by an operand check mechanism which determines whether one or both of the operands is a specific instance of a trivial operand. If one of the operands is a specific instance of a trivial operand, the complex arithmetic operations are halted and the check mechanism rapidly outputs the result of the arithmetic operation according to the trivial operand detected. Consequently, the need to perform complex arithmetic operations on trivial operands is avoided. The method does not however eliminate complex operations, it merely halts them if a determination is made that the operation is in fact a trivial one.